home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20030409-20031118 / 000077_fdc@columbia.edu_Tue May 13 17:46:23 EDT 2003.msg < prev    next >
Text File  |  2020-01-01  |  3KB  |  81 lines

  1. Article: 14297 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!news.columbia.edu!news-not-for-mail
  3. From: fdc@columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.protocols.kermit.misc
  5. Subject: Re: making kermit exit to the cmd prompt
  6. Date: 13 May 2003 17:46:03 -0400
  7. Organization: Columbia University
  8. Lines: 64
  9. Message-ID: <b9rp2r$crl$1@watsol.cc.columbia.edu>
  10. References: <pan.2003.05.13.15.46.19.79295.24789@armadillo.itg.ti.com> <pan.2003.05.13.15.49.42.267491.24789@armadillo.itg.ti.com> <b9rm7s$4tv$1@watsol.cc.columbia.edu> <pan.2003.05.13.16.28.20.796869.24852@armadillo.itg.ti.com>
  11. NNTP-Posting-Host: watsol.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1052862364 8684 128.59.39.139 (13 May 2003 21:46:04 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 13 May 2003 21:46:04 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14297
  16.  
  17. In article <pan.2003.05.13.16.28.20.796869.24852@armadillo.itg.ti.com>,
  18. David Huff  <dhuff@armadillo.itg.ti.com> wrote:
  19. : On Tue, 13 May 2003 15:57:32 -0500, Frank da Cruz wrote:
  20. : > It's for use when making connections.  Theoretically it should also work
  21. : > when *receiving* connections, but I'm not sure that was ever tried before
  22. : > now.  Anyway, why not just put EXIT commands at the appropriate points in
  23. : > your script?
  24. : Yeah, tried that:
  25. :   set <blah, blah>    ; set params
  26. :   answer              ; put in answer mode with no timeout
  27. :   exit                
  28. : Of course, as soon as it answers, it prompts me if it's OK to exit.
  29. :
  30. Well of course at this point you have to add commands after ANSWER that
  31. do what you want done after Kermit answers the phone.
  32.  
  33. : I believe I can control this prompting behaviuor with SET EXIT 
  34. : WARNING.
  35. :
  36. Right...
  37.  
  38. : But I don't want it to immediately exit after it answers, 
  39. : I want it to wait until the other end hangs up. I suppose I could 
  40. : just have it PAUSE first:
  41. :   set <blah, blah>      ; set params
  42. :   set exit warning off  ; don't prompt on exit
  43. :   answer                ; put in answer mode with no timeout
  44. :   pause 10              ; sleep 10 secs
  45. :   exit
  46. : but that seems, I dunno.. kinda cheesey ;) What I'd like to do is
  47. : replace the 'pause 10' line with something like (pardon the pseudo 
  48. : code):
  49. :   while connected {
  50. :       loop
  51. :   }
  52. So wait, all you want Kermit to do is answer the phone, then wait until
  53. the other side hangs up, then exit?  Well that's easy:
  54.  
  55.   answer
  56.   if fail exit 1
  57.   while > \v(m_sig_cd) 0 {  ; Check CD signal.
  58.       sleep 1               ; Still there - loop til gone.
  59.   }
  60.   exit 0
  61.  
  62. There are other ways too; e.g. you could try defining an ON_CLOSE macro.
  63. The WAIT command would have been perfect; it can be used to wait for
  64. specified modem signals to come on, but currently there is no syntax to
  65. wait for them to go off; I'll add this to my list.  Then you could do
  66. something like:
  67.  
  68.   answer
  69.   if fail exit 1
  70.   wait 0 -cd
  71.   exit \v(status)
  72.  
  73. - Frank
  74.